#include "Common.h"
#include "AudioObjectBase.h"
#include "AudioConstants.h"
#include "System.h"
#include "Monitor.h"

namespace Audio
{
	namespace Help
	{
		RuntimeMonitor::RuntimeMonitor()
		{

		}

		RuntimeMonitor::~RuntimeMonitor()
		{

		}

		void RuntimeMonitor::SendMessage(RuntimeMessage* message)
		{
			{
				LocalLocker l(lock);
				messages.push(message);
			}
			trigger->Signal();
		}

		void RuntimeMonitor::Run()
		{
			trigger->WaitOn();
			LocalLocker l(lock);
			{
				while(!messages.empty())
				{
					HandleMessage(messages.front());
					messages.pop();
				}
			}			
		}

		void RuntimeMonitor::HandleMessage(RuntimeMessage* message)
		{

		}
		UINT32 RuntimeMonitor::ReturnCode()
		{
			return 0;
		}



	}
}